package grpc_client

import (
	"longmen/server/config/global"
	"longmen/server/pkg/common/helper/const"
	"longmen/server/pkg/protobuf"
)

var GrpcSportServer protobuf.SportServerClient

var GrpcSportNewServer protobuf.SportNewServerClient

func InitSportsGrpc(token *Token) {
	sportsImConn := getClientConn(global.GetMicroserviceName(_const.GRPC_SPORT_SERVER_NAME_KEY), token)
	GrpcSportServer = protobuf.NewSportServerClient(sportsImConn)
}

func InitNewSportsGrpc(token *Token) {
	sportsImConn := getClientConn(global.GetMicroserviceName(_const.GRPC_SPORT_SERVER_NAME_KEY), token)
	GrpcSportNewServer = protobuf.NewSportNewServerClient(sportsImConn)
}
